package com.twinkle.model;

import lombok.Data;

import java.util.List;

/**
 * @title: MenuTree
 * @description:
 * @author: Paul
 * @date: 2023/3/31 16:17
 */
@Data
public class MenuTree {
    /**
     * id
     */
    public Integer id;
    /**
     * 信息
     */
    public String info;
    /**
     * 父id ，根节点为0
     */
    public Integer parentId;
    /**
     * 子节点信息
     */
    public List<MenuTree> childList;


    public MenuTree(Integer id, String info, Integer parentId) {
        this.id = id;
        this.info = info;
        this.parentId = parentId;
    }

    public MenuTree(Integer id, String info, Integer parentId, List<MenuTree> childList) {
        this.id = id;
        this.info = info;
        this.parentId = parentId;
        this.childList = childList;
    }
}
